import React, { useState } from 'react';
import { Table, Space } from 'antd';
import "./one.css"
const columns = [
    {
        title: 'ID',
        dataIndex: 'id',
        key: 'id',
        width: "70px",
        align: "center"
    },
    {
        title: '买家姓名',
        dataIndex: 'name',
        key: 'name',
        width: "70px",
        align: "center"
    },
    {
        title: '买家电话',
        dataIndex: 'haoma',
        key: 'haoma',
        width: "160px",
        align: "center"
    },
    {
        title: '商品图片',
        key: 'img',
        width: "100px",
        align: "center",
        render: (text, record) => (
            <img className="img" src={record.img} alt="" />
        ),
    },
    {
        title: '商品信息',
        dataIndex: 'sxin',
        key: 'sxin',
        width: "160px",
        align: "center"
    },
    {
        title: '买家信息',
        dataIndex: 'mxin',
        key: 'mxin',
        width: "120px",
        align: "center"
    },
    {
        title: '送货方式',
        dataIndex: 'fang',
        key: 'fang',
        width: "100px",
        align: "center"
    },
    {
        title: '支付金额',
        dataIndex: 'qian',
        key: 'qian',
        width: "90px",
        align: "center"
    },
    {
        title: '状态',
        dataIndex: 'lls',
        key: 'lls',
        width: "90px",
        align: "center"
    },
    {
        title: 'Action',
        key: 'action',
        align: "center",
        render: (text, record) => (
            <Space size="middle">
                <a href="/#">发货</a>
                <a href="/#">UU跑腿</a>
                <a href="/#">点我达</a>
                <a href="/#">修改自提点</a>
                <a href="/#">备注</a>
                <a href="/#">一键退款</a>
            </Space>
        ),
    },
];
const One = (props) => {
    const [current, setCurrent] = useState(1)
    const [pageSize, setPageSize] = useState(3)
    const handleTableChange = (pagination) => {
        setCurrent(pagination.current)
        setPageSize(pagination.pageSize)
    }
    return (
        <div>
            <Table pagination={{ current, pageSize }} onChange={handleTableChange} columns={columns} dataSource={props.data} />
        </div>
    )
}

export default One
